import 'package:get/get.dart';

import 'modal.dart';

var nologin =
    "https://tva1.sinaimg.cn/large/006y8mN6ly1g6tbgbqv2nj30i20i2wen.jpg";
var login =
    "https://tva1.sinaimg.cn/large/006y8mN6ly1g6tbnovh8jj30hr0hrq3l.jpg";

class SelectedIndexController extends GetxController {
  var selectIndex = 0.obs;
  changeSelectIndex(int index) {
    // print("触发");
    selectIndex.value = index;
  }
}

HeaderInfo noLoginInfo =
    HeaderInfo(nologin, onLoginInfo: ["登录", "注册"], explain: "登录后可以体验更多");
HeaderInfo loginInfo = HeaderInfo(login, nickName: "张三", explain: "查看编辑个人资料");

class LoginStateController extends GetxController {
  var loginState = true.obs;
  var userInfo = loginInfo.obs;
  changeLoginState(bool state) {
    loginState.value = state;
    userInfo.value = noLoginInfo;
  }
}
